#include "ExponentialRandom.h"
#include "cstdlib"

#include "cmath"
using namespace std;

ExponentialRandom::ExponentialRandom(double lambda)
{
    this->lambda = lambda;
    random.srand(rand());
}
double ExponentialRandom::Next()
{
    double r = random.randDouble();

    return -log(r) / lambda;
}
